﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Drawing;

namespace ImageAcquisitionTAL
{
    public interface IAcquisitionTechnology
    {
        /// <summary>
        /// get list of installed devices handled by this technology
        /// </summary>
        /// <returns></returns> 
        IEnumerable<ScannerInfo> GetInstalledScanners();
        
        /// <summary>
        /// get particular device info 
        /// </summary>
        /// <param name="deviceId"></param>
        /// <returns></returns>
        ScannerInfo GetScannerInfo(string deviceId);

        /// <summary>
        /// finds out if this technology is available on this computer or not
        /// </summary>
        /// <returns></returns>
        bool IsAvailable();
        
        /// <summary>
        /// acquires image from one of devices handled by this techology
        /// </summary>
        /// <param name="deviceId"></param>
        /// <returns></returns>
        Image Acquire(ScannerInfo scanner);
        
        /// <summary>
        /// acquires image from one of devices handled by this techology for fast preview
        /// </summary>
        /// <param name="deviceId"></param>
        /// <returns></returns>
        Image AcquireForPreview(ScannerInfo scanner);

        /// <summary>
        /// technology name
        /// </summary>
        string Name { get; }

        /// <summary>
        /// Acquire loop must begin with this call
        /// </summary>
        /// <returns>session info</returns>
        object BeginAcquire(ScannerInfo scanner);

        /// <summary>
        /// Acquire loop must end with this call
        /// </summary>
        /// <param name="session"></param>
        void EndAcquire(object session);
    }
}
